function save_course_box_details () {
	var box, header, brief, content, url, color, font_color;
	var result = "";
	var params;
	
	for (i=1;i<=6;i++) {
		box = document.getElementById("box_"+i);
		header = document.getElementById("header_"+i).value;
		brief = document.getElementById("brief_"+i).value;
		content = document.getElementById("content_"+i).value;
		url = document.getElementById("url_"+i).value;
		color = document.getElementById("color_"+ i).value;
		font_color = document.getElementById("font_color_"+ i).value;
		
		
		params = "?";
		params += "id=" + i;
		params += "&header=" + header;
		params += "&brief=" + brief;
		params += "&content=" + content;
		params += "&url=" + url;
		params += "&color=" + color;
		params += "&font_color=" + font_color;
		
		result += getFile("/modules/course_boxes/admin/save_course_box_details.php" + params);
	}
	
	document.getElementById("course_box_save_status").innerHTML = result;
}

function change_box_color (i) {
	var box = document.getElementById("box_"+i);
	var color = document.getElementById("color_"+ i).value;
	box.className = color + "_gradient";
}

function change_box_font_color (i) {
	var box = document.getElementById("box_"+i);
	var color = document.getElementById("font_color_"+ i).value;
	box.style.color =  color;
	
}